package com.peng.mapper;

import com.peng.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

public interface UserMapper {
    @Select("select * from user")
    List<User> getUsers();
    @Insert("insert into user values(#{id},#{name},#{password}) ")
    int addUser(User user);
    @Update("update user set name=#{name} where id=#{id}")
    int updateUser(@Param("name") String name,@Param("id") int id);

    @Delete("delete from user where id=#{Id}")
    int deleteUser(@Param("Id")int id);
}
